<?php
    /*
   ** sql link
   **
   **/
    header("charset=utf-8");
    Session_start();  
    // $servername="localhost";//   
    // $username="";
    // $password=".";
    // $dbname="";
    // $conn = mysql_connect($servername,$username,$password);
    // //mysql_query("set character set 'utf8'");//读库
    // //mysql_query("set names 'utf8'");//写库
    // if(!$conn){  
    //     echo json_encode('message',"sql error");
    //     exit;
    // }
    // mysql_select_db($dbname);  
    class Response{  
        public static function json($code,$message="",$data=array()){
            $result=array(
                'code'=>$code,
                'message'=>$message,
                'data'=>$data
            );
            //输出json
                //        return json_encode($result);
            echo json_encode($result);
            exit;
        }
    }  
  
?>  